<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery.min.js"></script>
    <!-- 引入bootstarp -->
    <script type="text/javascript" src="../js/bootstrap3/js/bootstrap.js"></script>
    <link rel="stylesheet" href="../js/bootstrap3/css/bootstrap.css">
    <!-- 引入tree的js、css -->
    <script type="text/javascript" src="../js/bootstrap-treeview/bootstrap-treeview.min.js"></script>
    <link rel="stylesheet" href="../js/bootstrap-treeview/bootstrap-treeview.min.css">
    <!-- 引入选项卡的js、css -->
    <script type="text/javascript" src="../js/bootStrap-addTabs/bootstrap.addtabs.js"></script>
    <link rel="stylesheet" href="../js/bootStrap-addTabs/bootstrap.addtabs.css">
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top"> <!--定义在容器顶部  -->
    <div class="container-fluid">
        <button type="button" class="navbar-toggle collapsed"
                data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
                aria-expanded="false">
            <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span>
            <span class="icon-bar"></span> <span class="icon-bar"></span>
        </button>
        <!-- Brand and toggle get grouped for better mobile display -->
        <!-- 头部信息 -->
        <div class="navbar-header">
            <a class="navbar-brand glyphicon glyphicon-globe"
               href="#" id="menu-toggle"> 管理系统 </a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse"
             id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="active ">
                    <a href="#"class="glyphicon glyphicon-shopping-cart">&nbsp招标采购
                        <span class="sr-only">(current)</span></a></li>
                <li>
                    <a href="#" class="glyphicon glyphicon-grain">&nbsp师资团队</a>
                </li>
                <li>
                    <a href="#" class="glyphicon glyphicon-sunglasses">&nbsp明星会员</a>
                </li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle glyphicon glyphicon-text-color" data-toggle="dropdown" role="button" aria-haspopup="true"aria-expanded="false">java课程
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="#" class="glyphicon glyphicon-cloud">云计算</a></li>
                        <li><a href="#" class="glyphicon glyphicon-th">云应用</a></li>
                        <li><a href="#" class="glyphicon glyphicon-info-sign">云服务</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#" class="glyphicon glyphicon-cloud-upload">大数据</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#" class="glyphicon glyphicon-cloud-download">数据挖掘</a></li>
                    </ul>
                </li>
            </ul>
            <form class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="Search">
                </div>
                <button type="submit" class="btn btn-default">Submit</button>
            </form>

            <!-- 右边的    导航 按钮 -->
            <ul class="nav navbar-nav navbar-right">
                <li>
                    <a href="#">Link</a>
                </li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="#">Action</a></li>
                        <li><a href="#">Another action</a></li>
                        <li><a href="#">Something else here</a></li>
                        <li role="separator" class="divider"></li>
                        <li><a href="#">Separated link</a></li>
                    </ul>
                </li>
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
</nav>
<!-- /.container-fluid -->
<!-- ============================导航结束==================================-->
<!--=========栅格布局 ==============-->
<div class="container-fluid" style="margin-top:70px">
    <div class="row">
        <div class="col-md-2">
            <!-- 展示树 -->
            <div id="myTree"></div>
        </div>
        <div class="col-md-10">
            <div id="myTabs">
                <!-- 新选项卡 -->
                <ul class="nav nav-tabs" id="tablist">
                    <li role="presentation" class="active">
                        <a href="#home" role="tab" data-toggle="tab">欢迎</a>
                    </li>
                </ul>

                <!-- 选项卡下内容 -->
                <div class="tab-content">
                    <div role="tabpanel" class="tab-pane info" id="home">
                        <center>
                            <h1 align="center"><font color="yellow">欢迎</font></h1>
                        </center>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    $(function(){
        initNavTree();
    })
    function initNavTree(){
        $.ajax({
            url:'../zsl/findManageTree',
            data:{},
            dataType:'json',
            type:'post',
            success:function (data) {
                $("#myTree").treeview({
                    data:data,
                    onNodeSelected:function(even,node){
                        $.addtabs.add({
                            id:node.id,
                            title:node.text,
                            url:"../"+node.path
                        })
                    }
                })
            }
        })
    }
</script>
</html>